<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="browsermode" content="application">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="Cache" content="no-cache">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <!-- 禁止百度转码 -->
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta name="format-detection" content="telephone=no">
    <title>首页</title>
    <link rel="stylesheet" href="${request.contextPath}/web/css/reset.css?v=${verison!}">
    <link rel="stylesheet" href="${request.contextPath}/web/css/base.css?v=${verison!}">
    <link rel="stylesheet" href="${request.contextPath}/web/css/index.css?v=${verison!}">
    <link rel="stylesheet" href="${request.contextPath}/web/css/swiper.min.css">
    <link rel="stylesheet" href="${request.contextPath}/plug/layui/css/layui.css" media="all">
</head>
<script type="text/javascript" src="${request.contextPath}/web/js/media_750.js"></script>
<script type="text/javascript" src="${request.contextPath}/web/js/jquery.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/web/js/jquery.mobile.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/web/js/swiper.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/web/js/common.js?v=${verison!}"></script>
<script src="${request.contextPath}/js/layer.js"></script>
<body style="background-color: rgb(255, 255, 255);">
<div data-role="page">
    <div class="app">
        <div class="index router">
            <div class="header acea-row row-center-wrapper">
                <!--<div class="logo">-->
                    <!--<img src="${request.contextPath}/web/images/84f2d5bc7867646fdd671380e2b35981.png"/>-->
                <!--</div>-->
                <a href="${request.contextPath}/web/search" class="search acea-row row-middle">
                    <img src="${request.contextPath}/web/images/search-icon.png" alt=""/>搜索商品
                </a>
            </div>
            <div class="slider-banner banner">
                <div class="swiper-container swiper-container-initialized swiper-container-horizontal swiper-container-ios">
                    <div class="swiper-wrapper">
                        <#if slide??>
                            <#list slide as item>
                                <div class="swiper-slide">
                                    <a href="<#if item.linkUrl??&&item.linkUrl?length gt 0>${item.linkUrl}<#else>${request.contextPath}/web/goodsDetail/${item.goodsId}</#if>" class="search acea-row row-middle">
                                        <img src="${item.image}">
                                    </a>
                                </div>
                            </#list>
                        </#if>
                    </div>
                    <div class="swiper-pagination paginationBanner swiper-pagination-clickable swiper-pagination-bullets">
                        <span class="swiper-pagination-bullet" tabindex="0" role="button"
                              aria-label="Go to slide 1"></span>
                        <span class="swiper-pagination-bullet swiper-pagination-bullet-active" tabindex="0"
                              role="button" aria-label="Go to slide 2"></span>
                    </div>
                </div>
            </div>
            <div class="nav acea-row">
                <a href="${request.contextPath}/web/searchType?typeId=10" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/1.png"/>
                    </div>
                    <div>工艺品</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=237" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/2.png"/>
                    </div>
                    <div>家具类</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=205" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/3.png"/>
                    </div>
                    <div>木雕类</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=13" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/4.png"/>
                    </div>
                    <div>大板类</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=135" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/5.png"/>
                    </div>
                    <div>生活用具</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=20" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/6.png"/>
                    </div>
                    <div>红木类</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=21" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/7.png"/>
                    </div>
                    <div>实木类</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=121" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/8.png"/>
                    </div>
                    <div>定制类</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=148" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/9.png"/>
                    </div>
                    <div>户外类</div>
                </a>
                <a href="${request.contextPath}/web/searchType?typeId=136" class="item">
                    <div class="pictrue">
                        <img src="${request.contextPath}/web/images/10.png"/>
                    </div>
                    <div>原材料</div>
                </a>
            </div>
            <div class="promotion-area-title">
                <img src="${request.contextPath}/web/images/promotion-area.png"/>
            </div>
            <div class="promotion-area">
                <a href="${request.contextPath}/web/skillGoods" class="seckill">
                    <div class="seckill-title"></div>
                    <div class="seckill-subtitle">民宿家居火热销售</div>
                    <div class="time">
                        <span class="timeTxt"></span>
                        <span class="styleAll time1">00</span>
                        <span class="timeTxt"> : </span>
                        <span class="styleAll time2">00</span>
                        <span class="timeTxt"> : </span>
                        <span class="styleAll time3">00</span>
                        <span class="timeTxt"></span>
                    </div>
                </a>
                <a href="${request.contextPath}/web/groupGoods" class="assemble">
                    <div class="assemble-title">一起来拼团</div>
                    <div class="assemble-subtitle">优惠多多</div>
                    <!--<img src="${request.contextPath}/web/images/assemble-bg1.beddfc74.png">-->
                </a>
            </div>
            <!--热门榜单-->
            <div class="hotList">
                <div class="publicTitle acea-row row-center-wrapper">
                    <img src="${request.contextPath}/web/images/remenbangdan.png"/>
                    <a href="${request.contextPath}/web/hotMore" class="more">更多&gt;</a>
                </div>
                <div class="list acea-row">
                    <#if hotData??>
                        <#list hotData as item>
                            <a href="${request.contextPath}/web/goodsDetail/${item.id}" class="item">
                                <div class="pictrue">
                                    <img src="${item.image}"/>
                                </div>
                                <div class="text">
                                    <div class="name line1">${item.goodsName}</div>
                                    <div class="money font-color-red">
                                        ¥<span class="num">${item.webPrice!}</span>
                                    </div>
                                </div>
                            </a>
                        </#list>
                    </#if>
                </div>
            </div>
            <!--商品促销-->
            <div class="promotion">
                <div class="publicTitle acea-row row-center-wrapper">
                    <img src="${request.contextPath}/web/images/shangpincuxiao.png"/>
                    <a href="${request.contextPath}/web/benefitMore" class="more">更多 &gt;</a>
                </div>
                <div class="publicList acea-row row-between-wrapper">
                    <#if benefitData??>
                        <#list benefitData as item>
                           <a href="${request.contextPath}/web/goodsDetail/${item.id}" class="item">
                                <div class="pictrue">
                                    <img src="${item.image}"/>
                                </div>
                                <div class="text">
                                    <div class="name line1">${item.goodsName}</div>
                                    <div class="acea-row row-between-wrapper">
                                        <div>
                                            <div class="money font-color-red">
                                                ¥<span class="num">${item.webPrice}</span>
                                                <span class="label"></span>
                                            </div>
                                            <div class="ot-money">${item.webOldPrice}</div>
                                        </div>
                                        <!--<div class="cart acea-row row-center-wrapper"></div>-->
                                    </div>
                                </div>
                            </a>
                        </#list>
                    </#if>
                </div>
            </div>
            <!--热门推荐-->
            <div class="recommend">
                <div class="title">
                    <img src="${request.contextPath}/web/images/hailiangjinping.png"/>
                </div>
                <div class="publicList acea-row row-between-wrapper">
                    <#if bestData??>
                        <#list bestData as item>
                            <a href="${request.contextPath}/web/goodsDetail/${item.id}" class="item">
                                <div class="pictrue">
                                    <img src="${item.image}"/>
                                </div>
                                <div class="text">
                                    <div class="name line1">${item.goodsName}</div>
                                    <div class="acea-row row-between-wrapper">
                                        <div>
                                            <div class="money font-color-red">
                                                ¥<span class="num">${item.webPrice}</span>
                                                <span class="label"></span>
                                            </div>
                                            <div class="ot-money">¥${item.webOldPrice}</div>
                                        </div>
                                        <!--<div class="cart acea-row row-center-wrapper">-->
                                            <!--<span class="iconfont icon-mzshopping"></span>-->
                                        <!--</div>-->
                                    </div>
                                </div>
                            </a>
                        </#list>
                    </#if>
                </div>
            </div><!---->
            <div style="height: 1.2rem;"></div>
        </div>
    </div>
    <#include "include/footer.html" />
    <#include "include/right.html" />
</div>
</body>
<script>
    var mySwiper = new Swiper('.swiper-container', {
        // 轮播图的方向，也可以是vertical方向
        direction: 'horizontal',
        //播放速度
        loop: true,
        // 自动播放时间
        autoplay: true,
        // 播放的速度
        speed: 2000,
        // 如果需要分页器，即下面的小圆点
        pagination: {
            el: '.swiper-pagination',
        },
        // 这样，即使我们滑动之后， 定时器也不会被清除
        autoplayDisableOnInteraction: false,

    });

    var seconds = parseInt('<#if seconds??>${seconds!}<#else>0</#if>');
    setInterval("timeover()", 1000)

    function timeover(){
        var result = formatSeconds(seconds);
        $(".time1").html(result[0]);
        $(".time2").html(result[1]);
        $(".time3").html(result[2]);
        seconds -= 1;
    }
    function formatSeconds(value) {
        var secondTime = parseInt(value);// 秒
        var minuteTime = 0;// 分
        var hourTime = 0;// 小时
        if(secondTime > 60) {//如果秒数大于60，将秒数转换成整数
            //获取分钟，除以60取整数，得到整数分钟
            minuteTime = parseInt(secondTime / 60);
            //获取秒数，秒数取佘，得到整数秒数
            secondTime = parseInt(secondTime % 60);
            //如果分钟大于60，将分钟转换成小时
            if(minuteTime > 60) {
                //获取小时，获取分钟除以60，得到整数小时
                hourTime = parseInt(minuteTime / 60);
                //获取小时后取佘的分，获取分钟除以60取佘的分
                minuteTime = parseInt(minuteTime % 60);
            }
        }

        var array = []

        var hour = parseInt(hourTime) > 9 ? parseInt(hourTime) : "0"+parseInt(hourTime)
        var minut = parseInt(minuteTime) > 9 ? parseInt(minuteTime) : "0"+parseInt(minuteTime)
        var second = parseInt(secondTime) > 9 ? parseInt(secondTime) : "0"+parseInt(secondTime)
        array.push(hour)
        array.push(minut)
        array.push(second)
        return array;
    }


</script>
</html>